<?php
include_once("impl/OperateImpl.php");

$opImpl 	= new OperateImpl(DB_TAG_SYSTEM);		//--> Operation

$arrOperate = $opImpl->getAuthOperates($gid, $menuid);

if(count($arrOperate) > 0){
	$strQuery 		= $_SERVER["REQUEST_URI"];
	$arrUrlInfo 	= pathinfo($strQuery);
	$selfFileName	= $arrUrlInfo['filename'];
	
	$arrOperateAllInfo = $opImpl->getArray(" WHERE id in (".implode(",", $arrOperate).")");
	
	$i = 0; 
	foreach($arrOperateAllInfo as $key => $value){
		$strFileName = $selfFileName."_".$value['name'].".php";

		if(file_exists($strFileName)){
			$arrOperateInfo[$i]['name'] 		= $value['name'];
			$arrOperateInfo[$i]['viewName'] 	= $value['name'];
			
			$i++;
		}
	}
}
?>
